package shun.demo.gson.model;

import com.google.gson.annotations.SerializedName;

/**
 * Created with IntelliJ IDEA.
 * User: chen
 * Date: 11/19/13
 * Time: 3:28 PM
 * To change this template use File | Settings | File Templates.
 */
public class Game {

    private static final int TYPE = 1;

    @SerializedName("title")
    private String name;
    private String icon;
    private String id;

    @SerializedName("package_name")
    private String packageName;

    public Game(String name, String icon, String id, String packageName) {
        this.name = name;
        this.icon = icon;
        this.id = id;
        this.packageName = packageName;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getPackageName() {
        return packageName;
    }

    public void setPackageName(String packageName) {
        this.packageName = packageName;
    }

    @Override
    public String toString() {
        return "name = " + name +
                "\nicon = " + icon +
                "\nid = " + id +
                "\npackageName = " + packageName;
    }

    public State getState() {
        return new State();
    }

    private class State {
        @SerializedName("played")
        private boolean mPlayed = true;

        @SerializedName("progress")
        private int mProgress = 50;
    }
}
